package api

import (
	"GIN-API/global"
	"GIN-API/internal/handlers"
	"GIN-API/internal/repository"
	"GIN-API/internal/service"
	"github.com/gin-gonic/gin"
)

func InitChannelRouter(r *gin.RouterGroup) {
	channelHandler := handlers.NewChannelHandler(service.NewChannelService(repository.NewChannelRepo(global.DB)))
	r.POST("/channels", channelHandler.CreateChannel)
	r.GET("/channels/:id", channelHandler.GetChannelByID)
	r.PUT("/channels/:id", channelHandler.UpdateChannel)
	r.DELETE("/channels/:id", channelHandler.DeleteChannel)
	r.GET("/channels/list", channelHandler.GetAllChannels)
}
